GNSS 9 Click
GNSS 9 Click demo application is developed using the NECTO Studio, ensuring compatibility with mikroSDK's open-source libraries and tools. Designed for plug-and-play implementation and testing, the demo is fully compatible with all development, starter, and mikromedia boards featuring a mikroBUS™ socket.
Click Library
- Author : Stefan Ilic
- Date : Jan 2024.
- Type : UART/I2C type
Software Support
Example Description
This example demonstrates the use of GNSS 9 Click by reading and displaying the GNSS coordinates.
Example Libraries
- MikroSDK.Board
- MikroSDK.Log
- Click.GNSS9
Example Key Functions
- gnss9_cfg_setup Config Object Initialization function.
void gnss9_cfg_setup(gnss9_cfg_t *cfg)
GNSS 9 configuration object setup function.
GNSS 9 Click configuration object.
Definition gnss9.h:202
- gnss9_init Initialization function.
struct gnss9_s gnss9_t
GNSS 9 Click context object.
err_t gnss9_init(gnss9_t *ctx, gnss9_cfg_t *cfg)
GNSS 9 initialization function.
- gnss9_get_pps_pin This function returns the PPS pin logic state.
uint8_t gnss9_get_pps_pin(gnss9_t *ctx)
GNSS 9 get PPS pin function.
- gnss9_reset_device This function resets the device by toggling the RST pin.
void gnss9_reset_device(gnss9_t *ctx)
GNSS 9 reset device function.
- gnss9_parse_gpgga This function parses the GPGGA data from the read response buffer.
err_t
gnss9_parse_gpgga ( uint8_t *rsp_buf, uint8_t gpgga_element, uint8_t *element_data );
err_t gnss9_parse_gpgga(uint8_t *rsp_buf, uint8_t gpgga_element, uint8_t *element_data)
GNSS 9 parse GPGGA function.
Application Init
Initializes the driver and resets the Click board.
{
log_cfg_t log_cfg;
LOG_MAP_USB_UART( log_cfg );
log_init( &logger, &log_cfg );
log_info( &logger, " Application Init " );
err_t init_flag =
gnss9_init( &gnss9, &gnss9_cfg );
if ( ( UART_ERROR == init_flag ) || ( I2C_MASTER_ERROR == init_flag ) )
{
log_error( &logger, " Communication init." );
for ( ; ; );
}
log_info( &logger, " Application Task " );
}
#define GNSS9_MAP_MIKROBUS(cfg, mikrobus)
MikroBUS pin mapping.
Definition gnss9.h:137
void application_init(void)
Definition main.c:68
Application Task
Reads the received data, parses the GPGGA info from it, and once it receives the position fix it will start displaying the coordinates on the USB UART.
{
if (
GNSS9_OK == gnss9_process( &gnss9 ) )
{
{
gnss9_parser_application( app_buf );
}
}
}
@ GNSS9_OK
Definition gnss9.h:236
void application_task(void)
Definition main.c:99
#define PROCESS_BUFFER_SIZE
Definition main.c:31
Application Output
This Click board can be interfaced and monitored in two ways:
- Application Output - Use the "Application Output" window in Debug mode for real-time data monitoring. Set it up properly by following this tutorial.
- UART Terminal - Monitor data via the UART Terminal using a USB to UART converter. For detailed instructions, check out this tutorial.
Additional Notes and Information
The complete application code and a ready-to-use project are available through the NECTO Studio Package Manager for direct installation in the NECTO Studio. The application code can also be found on the MIKROE GitHub account.